package homeworks.cjt2009.homework1.teacher.solution;

import java.io.File;
import java.util.ArrayList;
import java.util.Collection;

public class Main {
	public static void main(String[] args) {
		Collection<Room> rooms = new ArrayList<Room>();
		rooms.add(new Room(1,3,1));
		rooms.add(new Room(3,2,2));
		rooms.add(new Room(2,2,1));
		rooms.add(new Room(4,4,3));
		Collection<Guest> guests1 = new ArrayList<Guest>();
		guests1.add(new Guest("Kostadin", "kostadin.marinov@gmail.com"));
		guests1.add(new Guest("Presian", "presko@gmail.com"));
		Collection<Guest> guests2 = new ArrayList<Guest>();
		guests2.add(new Guest("Anna", "anki4@abv.bg"));
		guests2.add(new Guest("Hriska", "hipogrifkata@abv.bg"));
		
		MyHotel hotel = new MyHotel(rooms);
		try {
			hotel.rentARoom(guests2);
			hotel.rentARoom(guests2);
			hotel.rentARoom(guests1, 3);
			
		} catch (NoAvailableRoomException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println(hotel.store(new File("E:\\hotel.txt")));
	}
}
